<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
    <input type="button" value="返回" @click="back()"><br>
    <input type="button" value="navigateTo" @click="push('/test')">
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  data () {
    return {
      msg: 'Welcome to Your Vue.js App'
    }
  },
  methods: {
    back () {
      this.$router.navigateBack()
    },
    push (url) {
      this.$router.navigateTo(url)
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
